package org.example.bean;

import java.math.BigDecimal;

/**
 * 对应数据库表结构，存储评分区间相关的统计信息，包括评分区间、最小分、最大分、平均投票数、电影数量
 */
public class MovieScoreVotecount {
    // 评分区间，对应数据库 score_group 字段，类型为 String
    private String scoreGroup;
    // 最小分，对应数据库 min_score 字段，使用 BigDecimal 保证小数精度
    private BigDecimal minScore;
    // 最大分，对应数据库 max_score 字段，使用 BigDecimal 保证小数精度
    private BigDecimal maxScore;
    // 平均投票数，对应数据库 avg_vote_count 字段，类型为 int
    private int avgVoteCount;
    // 电影数量，对应数据库 movie_count 字段，类型为 int
    private int movieCount;

    public MovieScoreVotecount() {
    }

    public MovieScoreVotecount(String scoreGroup, BigDecimal minScore, BigDecimal maxScore, int avgVoteCount, int movieCount) {
        this.scoreGroup = scoreGroup;
        this.minScore = minScore;
        this.maxScore = maxScore;
        this.avgVoteCount = avgVoteCount;
        this.movieCount = movieCount;
    }

    // Getter 和 Setter 方法
    public String getScoreGroup() {
        return scoreGroup;
    }

    public void setScoreGroup(String scoreGroup) {
        this.scoreGroup = scoreGroup;
    }

    public BigDecimal getMinScore() {
        return minScore;
    }

    public void setMinScore(BigDecimal minScore) {
        this.minScore = minScore;
    }

    public BigDecimal getMaxScore() {
        return maxScore;
    }

    public void setMaxScore(BigDecimal maxScore) {
        this.maxScore = maxScore;
    }

    public int getAvgVoteCount() {
        return avgVoteCount;
    }

    public void setAvgVoteCount(int avgVoteCount) {
        this.avgVoteCount = avgVoteCount;
    }

    public int getMovieCount() {
        return movieCount;
    }

    public void setMovieCount(int movieCount) {
        this.movieCount = movieCount;
    }

    @Override
    public String toString() {
        return "MovieScoreVotecount{" +
                "scoreGroup='" + scoreGroup + '\'' +
                ", minScore=" + minScore +
                ", maxScore=" + maxScore +
                ", avgVoteCount=" + avgVoteCount +
                ", movieCount=" + movieCount +
                '}';
    }
}